package com.gavin.util;

import java.sql.Connection;
import java.sql.SQLException;

import com.mchange.v2.c3p0.ComboPooledDataSource;

/**
* @ClassName: c3p0Util
* @Description: c3p0工具类
* @author Gavin Nie  
* @e-mail Nie_ZW@163.com
* @date 2014年7月6日 下午10:35:34
*/ 
public class c3p0Util
{
	private static ComboPooledDataSource ds = null;
	
	/**
	* @Title: getConnection
	* @Description: 获取连接
	* @return Connection    返回类型
	* @throws
	*/ 
	public static Connection getConnection(){
		try
		{
			return ds.getConnection();
			
		} catch (SQLException e)
		{
			e.printStackTrace();
		}
		return null;
	}
	
	static {
		ds  = new ComboPooledDataSource();
	}
	
}
